<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script>
	function fn(){
		const A = function(){
			this.userName = "zhangsan";
		}
		const B = function(){
		
		}
		B.prototype = new A();
		B.prototype.constructor = B;
		return new B();
	}
	const obj = fn();
	// obj.__proto__.age = 13;
	obj.constructor.prototype.age = 100;
	console.log(obj);
	// console.log(obj.__proto__ === B.prototype);
	// console.log(B.prototype.__proto__ === A.prototype);
	// console.log(obj.__proto__.__proto__ === A.prototype);
	
	
</script>
</html>